package cn.itsource.ymcc.exception;

import lombok.Data;

@Data
public class CustomException extends RuntimeException{

    private String  message;
    private String code;


    public CustomException(){
        super();
    }

    public CustomException(String s){
        super(s);
    }

    public CustomException(ErrorCode errorCode){
        super(errorCode.getMessage());
        this.message = errorCode.getMessage();
        this.code = errorCode.getCode();
    }

    public CustomException(String message, String code){
        super(message);
        this.message = message;
        this.code = code;
    }

}